package com.quark.framework.base;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

import com.quark.framework.startup.QuarkFrameworkLauncher;
import com.quark.framework.utility.QuarkLog;

public class QuarkGenericManager {
	
	List<QuarkGenericMember> members = new ArrayList<QuarkGenericMember>();
	
	public boolean init()
	{		
		Iterator<QuarkGenericMember> it = members.iterator();
		while(it.hasNext())
		{
			if(!it.next().init(null))
				return false;
		}
		return true;
	}
	public boolean uninit()
	{
		Iterator<QuarkGenericMember> it = members.iterator();
		while(it.hasNext())
		{
			if(!it.next().uninit())
				return false;
		}
		return true;
	}
	public boolean registerMember(QuarkGenericMember member)
	{
		return members.add(member);
	}
}
